<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('学生信息表列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="fName"/>
                            </li>
                            <li>
                                <label>班级：</label>
                                <input type="text" name="fClassname"/>
                            </li>
                            <li>
                                <label>学校：</label>
                                <input type="text" name="fSchool"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manager:studentinfo:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manager:studentinfo:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manager:studentinfo:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manager:studentinfo:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('manager:studentinfo:edit')}]];
        var removeFlag = [[${@permission.hasPermi('manager:studentinfo:remove')}]];
        var fSexDatas = [[${@dict.getType('sys_user_sex')}]];
        var fClasstypeDatas = [[${@dict.getType('teach_classtype')}]];
        var fStateDatas = [[${@dict.getType('student_status')}]];
        var prefix = ctx + "manager/studentinfo";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "学生信息表",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'fId',
                    title: 'ID号',
                    visible: false
                },
                {
                    field: 'fName',
                    title: '姓名'
                },
                {
                    field: 'fSex',
                    title: '性别',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(fSexDatas, value);
                    }
                },
                {
                    field: 'fClassname',
                    title: '班级'
                },
                {
                    field: 'fClasstype',
                    title: '班级类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(fClasstypeDatas, value);
                    }
                },
                {
                    field: 'fSchool',
                    title: '学校'
                },
                {
                    field: 'fMajor',
                    title: '专业'
                },
                {
                    field: 'fCourse',
                    title: '所学课程'
                },
                {
                    field: 'fGraduationtime',
                    title: '毕业时间'
                },
                {
                    field: 'fPhone',
                    title: '电话'
                },
                {
                    field: 'fDegree',
                    title: '学历'
                },
                {
                    field: 'fQq',
                    title: 'QQ号'
                },
                {
                    field: 'fAddr',
                    title: '家庭住址'
                },
                {
                    field: 'fAddrlong',
                    title: '住址经度'
                },
                {
                    field: 'fAddrlat',
                    title: '住址纬度'
                },
                {
                    field: 'fUrgentperson',
                    title: '紧急联系人'
                },
                {
                    field: 'fUrgentphone',
                    title: '紧急联系人电话'
                },
                {
                    field: 'fIdnum',
                    title: '身份证号'
                },
                {
                    field: 'fCstartdate',
                    title: '开班时间'
                },
                {
                    field: 'fCenddate',
                    title: '结束时间'
                },
                {
                    field: 'fState',
                    title: '学员状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(fStateDatas, value);
                    }
                },
                {
                    field: 'fCompany',
                    title: '就业公司'
                },
                {
                    field: 'fSalary',
                    title: '就业薪资'
                },
                {
                    field: 'fLevel',
                    title: '学员学习级别'
                },
                {
                    field: 'fRemark',
                    title: '学员其它描述'
                },
                {
                    field: 'fConsultant',
                    title: '咨询师'
                },
                {
                    field: 'fHeadmaster',
                    title: '班主任'
                },
                {
                    field: 'fRecoder',
                    title: '录入员'
                },
                {
                    field: 'fSource',
                    title: '学生来源'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.fId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.fId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>